body {
    padding-bottom: 200px;
}

@keyframes changeColor {
    0% {
        background-color: red;
    }
    20% {}
    50% {
        background-color: #fff;
    }
    100% {
        background-color: green;
    }
}

.box {
    width: 100px;
    height: 100px;
    background-color: blue;
    animation: changeColor 5s linear 2s infinite;
}

@keyframes run {
    25% {
        transform: translateX(200px);
        background-color: #fff;
    }
    50% {
        transform: translate(200px, 200px);
        background-color: rgb(187, 62, 62);
        ;
    }
    75% {
        transform: translateY(200px);
        background-color: rgb(62, 187, 72);
        ;
    }
    100% {
        transform: translateY(0)
    }
}

.box1 {
    width: 100px;
    height: 100px;
    position: relative;
    left: 40%;
    background-color: rgb(255, 187, 0);
    /* 延迟可以是负数，元素的初始位置是在第3秒 */
    animation: run 5s linear 0 infinite;
}

div.container {
    margin: 100px auto;
    width: 400px;
    height: 400px;
    border: 1px solid red;
    border-radius: 50%;
    outline: 1px solid black;
    position: relative;
}

@keyframes round {
    from {
        transform: rotate(0deg)
    }
    to {
        transform: rotate(360deg)
    }
}

.ball {
    width: 100px;
    height: 100px;
    background-color: rgb(113, 184, 86);
    border-radius: 50%;
    /* transform: translate(150px, -50px); */
    /* position: absolute;
    top: -50px;
    left: 150px; */
    transform-origin: 200px 200px;
    ;
    /* transform: rotate(45deg); */
    animation: round 6s linear infinite;
    animation-play-state: paused
}

.ball:nth-child(1) {
    animation-delay: 0;
}

.ball:nth-child(2) {
    animation-delay: 0s;
}

.ball:nth-child(3) {
    animation-delay: 0s;
}

h2 {
    text-align: center;
}

.container:hover .ball {
    animation-play-state: running;
    animation: name duration timing-function delay iteration-count direction fill-mode;
}


/*------- 波运动 ----------*/

@keyframes wave {
    25% {
        transform: translateY(-50px)
    }
    50% {
        transform: translateY(0px)
    }
    75% {
        transform: translateY(50px)
    }
    100% {
        transform: translateY(0px)
    }
}

.c1 {
    width: 800px;
    height: 300px;
    border: 1px solid red;
    margin: 0 auto;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.b1 {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: rgb(65, 65, 65);
    animation: wave 2s linear infinite;
    /* animation-play-state: paused; */
}

.b1:nth-child(2n) {
    animation-delay: -0.25s;
}

.b1:nth-child(3n) {
    animation-delay: -0.5s;
}

.b1:nth-child(4n) {
    animation-delay: -0.75s;
}

.b1:nth-child(5n) {
    animation-delay: -1s;
}

.b1:nth-child(6n) {
    animation-delay: -1.25s;
}

.b1:nth-child(7n) {
    animation-delay: -1.5s;
}

.b1:nth-child(8n) {
    animation-delay: -1.75s;
}